package com.alibaba.citrus.cr.platform.enhance.repository;

import java.util.List;

import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.sdk.model.Result;

import com.epoch.app.crplatformenhance.domain.customeraddress.model.CustomerAddress;
import com.epoch.app.crplatformenhance.dto.feature.FullOrganizationValue;
import com.epoch.app.crplatformenhance.dto.request.CustomerAddressBatchRequest;
import com.epoch.app.crplatformenhance.dto.request.CustomerAddressRequest;
import com.epoch.app.crplatformenhance.dto.request.QueryAddressRequest;
import com.epoch.app.crplatformenhance.dto.request.SimpleQueryAddressRequest;
import com.epoch.app.crplatformenhance.sdo.CustomerAddressSDO;
import com.epoch.app.crpricecenter.model.dto.CustomerItemPriceRequest;

public interface CustomerAddressRepository {

    /**
     * 编辑用户地址
     *
     * @param addressSDO
     * @return
     */
    Boolean editAddress(CustomerAddressSDO addressSDO);

    /**
     * 查询用户地址详情
     *
     * @param customerAddressRequest
     * @return
     */
    CustomerAddressSDO query(CustomerAddressRequest customerAddressRequest);

    /**
     * 分页查询用户地址
     *
     * @param request
     * @return
     */
    PageResult<List<CustomerAddressSDO>> pageQuery(QueryAddressRequest request);

    /**
     * 简单分页查询用户地址
     *
     * @param request
     * @return
     */
    PageResult<List<CustomerAddressSDO>> simplePageQuery(SimpleQueryAddressRequest request);

    /**
     * 批量查询用户地址
     * @param request
     * @return
     */
    List<CustomerAddressSDO> batchQuery(CustomerAddressBatchRequest request);

    /**
     * 查询地址负责人总数
     * @param fullOrganizationValue
     * @return
     */
    Integer queryAddressPrincipalCount(FullOrganizationValue fullOrganizationValue, List<String> employeeIdList);

    /**
     * 查询地址负责人
     * @param fullOrganizationValue
     * @return
     */
    List<String> queryAddressPrincipalList(FullOrganizationValue fullOrganizationValue, List<String> employeeIdList);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    CustomerAddressSDO load(String id);

    /**
     * 根据销售组织，渠道，货品，收货地址查询
     * @param customerItemPriceRequest
     * @return
     */
    Result<List<CustomerAddress>> pageQueryCustomerAddressData(CustomerItemPriceRequest customerItemPriceRequest);
}
